home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 1
/
LIGHT-ROM 1 (Amiga Library Services)(1994).iso
/
ffdisks
/
d998.lha
/
TeXPrt
/
source
/
TexPrt.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-04-05
|
8KB
|
209 lines
/***************************************************************************
* *
* Filename : TeXPrt.h *
* *
* Description : Header file for TeXPrt.c *
* *
***************************************************************************
* *
* Modification History *
* *
* Date Author Comments *
* ---------------------------------------------------------------------- *
* 25.10.92 R.Bödi Created. *
* 2.11.93 R.Bödi Changed structure tags raw_HOffset, cmd_HOffset,*
* raw_VOffset and cmd_VOffset in struct TeXDriver *
* to ***_HOffset[2] and ***_VOffset[2] to enable *
* parameters of the form -h10truemm which is used *
* in DVIPrint 1.19 for horizontal offset. *
* cmd_HOffset[0] contains the switch "-h" and *
* cmd_HOffset[1] is filled with the keyword "true"*
* 12.2.94 R.Bödi Changed structure tags Option_1 .. Option_5 *
* to an option array. *
* 16.2.94 R.Bödi Split struct TeXDriver into separate structures *
* called TeXDriver, RawSettings, *
* ParsedSettings, and DefaultSettings. *
* 2.3.94 R.Bödi Added tags DVIFile and Misc to structures *
* RawSettings and ParsedSettings. *
* *
***************************************************************************
* *
* Copyright © 1993-1994 Richard Bödi, All rights reserved. *
* *
***************************************************************************/
/*----------------------------- INCLUDES ----------------------------------*/
#include "stdlib.h"
#include "stdio.h"
#include "string.h"
#include "dos.h"
#define INTUITION_IOBSOLETE_H
#include "graphics/displayinfo.h"
#include "intuition/intuition.h"
#include "intuition/screens.h"
#include "intuition/classes.h"
#include "intuition/classusr.h"
#include "intuition/imageclass.h"
#include "intuition/gadgetclass.h"
#include "workbench/workbench.h"
#include "workbench/startup.h"
#include "utility/tagitem.h"
#include "libraries/gadtools.h"
#include "libraries/asl.h"
#include "libraries/mui.h"
#include "clib/alib_protos.h"
#include "clib/exec_protos.h"
#include "clib/dos_protos.h"
#include "clib/graphics_protos.h"
#include "clib/intuition_protos.h"
#include "clib/gadtools_protos.h"
#include "clib/icon_protos.h"
#include "clib/wb_protos.h"
#include "clib/utility_protos.h"
#include "clib/asl_protos.h"
#include "clib/muimaster_protos.h"
#include "pragmas/exec_pragmas.h"
#include "pragmas/dos_pragmas.h"
#include "pragmas/graphics_pragmas.h"
#include "pragmas/intuition_pragmas.h"
#include "pragmas/gadtools_pragmas.h"
#include "pragmas/icon_pragmas.h"
#include "pragmas/wb_pragmas.h"
#include "pragmas/utility_pragmas.h"
#include "pragmas/rexxsyslib_pragmas.h"
#include "pragmas/asl_pragmas.h"
#include "pragmas/muimaster_pragmas.h"
/*--------------------------- DEFINES -------------------------------------*/
#define BUFFERLENGTH 128
#define NAMELENGTH 32
#define MAXLOGOLENGTH 80
#define CMDLENGTH 64
#define CMDSTRLENGTH 512
#define OPTIONS 10
#define STDITEMS 6 // Number of menu items in the project menu.
/*---------------------- STRUCTURE DEFINITIONS ---------------------------*/
enum PageSel { DOCUMENT, FROMTO };
enum PageType { ALL, ODD, EVEN };
enum Orientation { PORTRAIT, LANDSCAPE };
enum MUIElements { ID_PAGESEL = 0, ID_FROM_PAGE, ID_TO_PAGE, ID_PAGETYPE,
ID_ORIENTATION, ID_NO_COPIES, ID_HOFFSET, ID_VOFFSET,
ID_HOFFSET_UNIT, ID_VOFFSET_UNIT,
ID_OPTION = 10, ID_OPTION_TXT = ID_OPTION + OPTIONS,
ID_DVIFILE = ID_OPTION_TXT + OPTIONS, ID_GETFILE_IN,
ID_OUTFILE, ID_GETFILE_OUT,
ID_QUIT, ID_PRINT, ID_PRINTAREXX,
ID_SAVE, ID_SAVEAS, ID_ABOUT,
ID_TOFRONT, ID_TOBACK, ID_SCREENTOFRONT, ID_SCREENTOBACK,
ID_DRIVER,
LAST_ID };
enum Keywords { KW_SHELL, KW_FILE, KW_APPICON, LAST_KW };
struct Status
{
BOOL Print;
BOOL Exit;
BOOL ARexx;
};
struct Args
{
long ArgPtr[LAST_KW];
char ArgStr[LAST_KW][FMSIZE]; // FMSIZE see file dos.h
};
struct AvailDrivers
{
int NoOfDrivers;
char *DriverFiles;
char *DriverNames;
};
struct TeXDriver
{
char DriverName[CMDLENGTH]; // Name of printer driver
char ProgramNode[FMSIZE]; // Full path of the printer driver
};
struct RawSettings
{
char PageSel[CMDLENGTH]; // unparsed settings
char Copies[CMDLENGTH];
char PageType[CMDLENGTH];
char HOffset[CMDLENGTH], VOffset[CMDLENGTH];
char HOffsetUnit[CMDLENGTH], VOffsetUnit[CMDLENGTH];
char HOffsetTxt[CMDLENGTH], VOffsetTxt[CMDLENGTH];
char Orientation[CMDLENGTH];
char Option[OPTIONS][CMDLENGTH];
char OptionTxt[OPTIONS][CMDLENGTH];
char Device[CMDLENGTH];
char DVIFile[CMDLENGTH];
char Misc[CMDLENGTH];
};
struct ParsedSettings
{
char From[CMDLENGTH], To[CMDLENGTH]; // parsed setting strings
char NoOfPages[CMDLENGTH];
char Copies[CMDLENGTH];
char AllPages[CMDLENGTH];
char OddPages[CMDLENGTH];
char EvenPages[CMDLENGTH];
char HOffset[CMDLENGTH], VOffset[CMDLENGTH];
char HOffsetUnit[CMDLENGTH], VOffsetUnit[CMDLENGTH];
char HOffsetTxt[CMDLENGTH], VOffsetTxt[CMDLENGTH];
char Portrait[CMDLENGTH];
char LandScape[CMDLENGTH];
char Option[OPTIONS][CMDLENGTH];
char OptionTxt[OPTIONS][CMDLENGTH];
char Device[CMDLENGTH];
char DVIFile[CMDLENGTH];
char Misc[CMDLENGTH];
};
struct DefaultSettings
{
enum PageSel PageSel; // default settings
unsigned long Copies;
enum PageType PageType;
enum Orientation Orientation;
long HOffset, VOffset;
long AdjHOffset, AdjVOffset; // adjustment for origin
BOOL Option[OPTIONS];
char DeviceName[CMDLENGTH];
};
struct MUIPointers
{
APTR app, MainWindow, STR_DVIFile, IMG_In, STR_OutFile, IMG_Out, RAD_FromTo;
APTR STR_From, STR_To, RAD_OddEven, STR_Copies, RAD_Orientation, STR_X, TXT_X;
APTR STR_Y, TXT_Y, CHM_Option[OPTIONS], TXT_Option[OPTIONS];
APTR BUT_Quit, BUT_Print;
};
struct StructPointers
{
struct AvailDrivers *AvailDrivers;
struct TeXDriver *TeXDriver;
struct RawSettings *RawSettings;
struct ParsedSettings *ParsedSettings;
struct DefaultSettings *DefaultSettings;
struct MUIPointers *MUIPointers;
BOOL ARexxAvailable;
USHORT DriverNumber;
};
/*----------------------- END OF HEADER FILE ---------------------------*/